package com.kx.center.service.impl;

import com.kx.center.entity.common.Region;
import com.kx.center.mappers.RegionMapper;
import com.kx.center.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by acmen on 16-1-15.
 */
@Service
public class RegionServiceImpl implements RegionService {

    @Autowired
    private RegionMapper regionMapper;

    @Override
    public List<Region> findProvince() {
        return regionMapper.findProvince();
    }

    @Override
    public List<Region> findCity(int provinceId) {
        return regionMapper.findCity(provinceId);
    }

    @Override
    public List<Region> findArea(int cityId) {
        return regionMapper.findArea(cityId);
    }

    @Override
    public Region getRegionById(int regionId) {
        return regionMapper.getRegionById(regionId);
    }


}
